package com.be.beadmin.quality.entity;

import com.be.beadmin.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;


/**
* @website
* @description 客户投诉
* @author zjm
* @date 2023-05-15
**/
@Data
@Entity
@Getter
@Setter
@Table(name="T_QM_CustomComplaint")
public class CustomComplaint extends BaseEntity {

    @Column(name = "projectName",columnDefinition = "VARCHAR(50) COMMENT '项目名称' ")
    private String projectName;

    @Column(name = "InfoId",columnDefinition = "VARCHAR(50) COMMENT '项目id'")
    private String infoId;

    @Column(name = "ProjectCode",columnDefinition = "VARCHAR(50) COMMENT '项目编码' ")
    private String projectCode;

    @Column(name = "Maker",columnDefinition = "VARCHAR(50) COMMENT '提出人' ")
    private String maker;

    @Column(name = "MakerId",columnDefinition = "VARCHAR(50) COMMENT '提出人ID' ")
    private String makerId;

    @JsonFormat(pattern = "yyyy-MM-dd kk:mm", timezone = "GMT+8")
    @Column(name = "MakerTime", columnDefinition = "datetime COMMENT '提出时间' ")
    private Date makerTime;

    @Column(name = "ProblemTextDes",columnDefinition = "VARCHAR(50) COMMENT '问题文字描述' ")
    private String problemTextDes;

    @Column(name = "ProblemPicUrl",columnDefinition = "VARCHAR(50) COMMENT '问题图片URL' ")
    private String problemPicUrl;

    @Column(name = "ProblemPicFileCode",columnDefinition = "VARCHAR(255) COMMENT '问题图片文件编码'")
    private String problemPicFileCode;

    @Column(name = "ProblemPicFileName",columnDefinition = "VARCHAR(255) COMMENT '问题图片文件名称'")
    private String problemPicFileName;

    @Column(name = "ProblemPicBucketName",columnDefinition = "VARCHAR(255) COMMENT '问题图片的bucketName' ")
    private String problemPicBucketName;

    @Column(name = "Responsor",columnDefinition = "VARCHAR(50) COMMENT '负责人' ")
    private String responsor;

    @Column(name = "ResponsorId",columnDefinition = "VARCHAR(50) COMMENT '负责人ID' ")
    private String responsorId;

    @Column(name = "TempSolution",columnDefinition = "text COMMENT '临时解决方案' ")
    private String tempSolution;

    @Column(name = "ReasonAnalysis",columnDefinition = "text COMMENT '原因分析及描述' ")
    private String reasonAnalysis;

    @Column(name = "ImprovementUrl",columnDefinition = "text COMMENT '后续改进方案（附件）' ")
    private String improvementUrl;

    @Column(name = "ImprovementFileCode",columnDefinition = "VARCHAR(255) COMMENT '后续改进附件编码'")
    private String improvementFileCode;

    @Column(name = "ImprovementFileName",columnDefinition = "VARCHAR(255) COMMENT '后续改进附件名称'")
    private String improvementFileName;

    @Column(name = "ImprovementBucketName",columnDefinition = "VARCHAR(255) COMMENT '后续改进附件的bucketName' ")
    private String improvementBucketName;
    @Column(name = "BaseReasonAnalysis",columnDefinition = "text COMMENT '根本原因分析及描述' ")
    private String baseReasonAnalysis;

    @Column(name = "ImprovementText",columnDefinition = "text COMMENT '后续改进方案（描述）' ")
    private String improvementText;


    @Column(name = "CustomerName",columnDefinition = "VARCHAR(50) COMMENT '客户名称' ")
    private String customerName;

    @Column(name = "BugCount",columnDefinition = "int COMMENT '缺陷数量' ")
    private Integer bugCount;

    @Column(name ="ProblemType",columnDefinition = "VARCHAR(50) COMMENT '问题类别'")
    private String problemType;

    /**
     * 0 - 待上传 -- QM
     * 1 - 待处理 -- 负责人
     * 2 - 待分析 -- QM
     * 3 - 待确认 -- 负责人
     * 4 - 已确认 -- 负责人
     * 5 - 已关闭 -- QM
     */
    @Column(name = "State",columnDefinition = "decimal(1) COMMENT '状态' ")
    protected Integer state = 0;

    @JsonFormat(pattern = "yyyy-MM-dd kk:mm:ss", timezone = "GMT+8")
    @Column(name = "FinishTime", columnDefinition = "datetime COMMENT '完成日期' ")
    private Date finishTime;



}
